<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<html>
<head>
    <title>知士荟</title>
    <link rel="stylesheet" href="../css/discuss-send.css" />
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="../js/space-discuss-send.js"></script>
    <script type="text/javascript" charset="utf-8" src="../ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="../ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="../ueditor/lang/zh-cn/zh-cn.js"></script>
</head>

<body>
<!--**************顶部导航****************-->
<%@include file="../jsp/common/nav.jsp"%>
<!--**************左侧导航****************-->
<%@include file="../jsp/common/sidebar-scroll.jsp"%>
<!--***************右侧发起话题界面*******************-->
<c:set var="user" value="${sessionScope.user}"/>
<c:set var="space" value="${sessionScope.space}"/>
<div class="right">
    <!--标题导航-->
    <div class="discuss-nav">
        <span class="discuss-nav-title"><a href="/index/main?id=${user.id}">学习空间</a></span>
        >
        <span class="discuss-nav-title"><a href="/index/space-main?space_id=${space.id}&name=${space.name}">${space.name}</a></span>
        >
        <span class="discuss-nav-title"><a href="/discuss/space-discuss">讨论区</a></span>
        >
        <span>发布话题</span>
    </div>
    <!--讨论标题-->
    <div class="discuss-title">
        <h3>发布话题</h3>
        <h5>话题标题</h5>
        <form action="/discuss/add" id="addForm">
            <input type="text" name="title" id="title" value="" size="130" placeholder="标题"/>

            <h5>*话题内容</h5>
            <script id="editor" type="text/plain" style="width:880px;height:280px;"></script>
            <script type="text/javascript">
            //实例化编辑器
            //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
            var ue = UE.getEditor('editor');

            </script>

            <!--特别提醒-->
            <div class="discuss-tab">
                <span class="tab-title">特别提醒</span>
                <span>
                    <select name="focus" style="width:180px;height:35px;" onchange="setFocus(this.options[this.options.selectedIndex].value)">
                        <option value="0">--请选择--</option>
                        <c:forEach items="${memberList}" var="member">
                            <option value="${member.id}">
                                    ${member.username}
                            </option>
                        </c:forEach>
                    </select>
                </span>
            </div>

            <!--添加标签-->
            <div class="discuss-tab">
                <div class="tab-title">添加标签</div>
                <div class="lab-1">
                    <span class="lab_title">已选标签</span>
                    <ul id="ul1" class="selected"></ul>
                    <input type="text" id="input" placeholder="请输入标签(最多可选择5个)">
                    <input type="button" id="add" value="添加">
                </div>
                <div class="lab-2">
                    <span class="lab_title">标签库</span>
                    <ul id="ul2" class="none">
                        <li class="none-li">技术博客</li>
                        <li class="none-li">疑惑</li>
                        <li class="none-li">经验</li>
                        <li class="none-li">代码</li>
                        <li class="none-li">便签维护</li>
                    </ul>
                </div>
            </div>

            <!--按钮-->
            <div class="discuss-button">
                <input type="button" id="submit" value="发布话题贴" onclick="LabelSubmit()"/>
                <input type="reset" name="reset" id="reset" value="取消"/>
            </div>
        </form>
    </div>
</div>
</body>
</html>
